package com.dao;

import java.util.List;
import java.util.Map;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.po.PicturePO;
@Repository
public class PictureDao {
	@Autowired
	private SqlSessionTemplate sqlTemplate;
	/**
	 * 查找实训图
	 * @return
	 */
	public List<PicturePO> findPictureList() {
		return sqlTemplate.selectList("picture.findPictureList");
	}
	
	/**
	 * 修改数据时回显数据
	 * @param id
	 * @return
	 */
	public PicturePO findPicturePOById(String id) {
		return sqlTemplate.selectOne("picture.findPicturePOById",id);
	}
	/**
	 * 修改数据
	 * @param map
	 */
	public void updateInfo(Map<String, String> map) {
		sqlTemplate.update("picture.updateInfoById", map);
	}

}
